-- GENERATED SPELL FOR [Wyrm from Beyond] --


function spell0_21796(pUnit, Event) --@Mana Burn,n/a--
pUnit:FullCastSpellOnTarget(13321,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_21796', 3000, 1)
end

function spell1_21796(pUnit, Event) --@Phase Slip,Self--
pUnit:FullCastSpellOnTarget(36574,pUnit)
pUnit:RegisterEvent('Sorts_21796', 8347, 1)
end

function Sorts_21796(pUnit, Event)
local choix_sorts_21796 = math.random(0, 1)
if choix_sorts_21796 == 0 then
pUnit:RegisterEvent('spell0_21796', 1, 1)
end
if choix_sorts_21796 == 1 then
pUnit:RegisterEvent('spell1_21796', 1, 1)
end
end

function mob21796_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_21796', math.random(1500, 3000), 1)
end

function mob21796_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob21796_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob21796_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(21796, 1, 'mob21796_Action')
RegisterUnitEvent(21796, 2, 'mob21796_Leave')
RegisterUnitEvent(21796, 3, 'mob21796_Kill')
RegisterUnitEvent(21796, 4, 'mob21796_Die')
